import http from "./request.js";

//登录
export const loginUser = (data) => http.post('/login/loginUser', data)

//首页轮播图
export const selectJsCarousel = (data) => http.post('/HomePage/selectJsCarousel',data)

//查看所有课程
export const selectJsCourse = (data) => http.post('/HomePage/selectJsCourse',data)

//通过Id查看课程详情
export const selectJsCourseById = (data) => http.post("/HomePage/selectJsCourseById",data)

//通过id查看课程类型下的所有课程
export const selectJsCourseTypeById = (data) => http.post("/HomePage/selectJsCourseTypeById",data)

//查看课程评论
export const selectJsCourseComment = (data) => http.post("/HomePage/selectJsCourseComment",data)

//查看课程销量
export const selectJsCourseSalesVolume = (data) => http.post("/HomePage/selectJsCourseSalesVolume",data)

//查看用户课程点赞量(包含了判断当前用户是否点赞)
export const selectJsCourseLikeNum = (data) => http.post("/HomePage/selectJsCourseLikeNum",data)

//查看用户课程收藏量(包含了判断当前用户是否点赞)
export const selectJsCourseCollectNum = (data) => http.post("/HomePage/selectJsCourseCollectNum",data)

//查看用户课程分享量
export const selectJsCourseShareNum = (data) => http.post("/HomePage/selectJsCourseShareNum",data)

//添加课程点赞量
export const insertCourseLikeNum = (data) => http.post("/HomePage/insertCourseLikeNum",data)

//删除课程点赞量
export const delCourseLikeNum = (data) => http.post("/HomePage/delCourseLikeNum",data)

//添加课程收藏量
export const insertCourseCollectNum = (data) => http.post("/HomePage/insertCourseCollectNum",data)

//删除课程收藏量
export const  delCourseCollectNum = (data) => http.post("/HomePage/delCourseCollectNum",data)

//添加课程评论
export const insertCourseComment = (data) => http.post("/HomePage/insertCourseComment",data)

//添加课程评论的点击量
export const insertCourseCommentLikeNum = (data) => http.post("/HomePage/insertCourseCommentLikeNum",data)

//删除课程评论的点击量
export const deleteCourseCommentLikeNum = (data) => http.post("/HomePage/deleteCourseCommentLikeNum",data)

//查看当前用户是否点赞课程评论
export const selectCourseCommentLikeNum = (data) => http.post("/HomePage/selectCourseCommentLikeNum",data)

//加入购物车
export const addShopOrder = (data) => http.post("/shopping/addShopOrder",data)

//查看是否有默认地址
export const selectUserDefaultCity = (data) => http.post("/shopping/selectUserDefaultCity",data)

//查询可选择的地址
export const selectJsRegion = (data) => http.post("/shopping/selectJsRegionAddress",data)

//查询可用以及不可用优惠券
export const selectJsCouponYesOrNo = (data) => http.post("/shopping/selectJsCouponYesOrNo",data)

//添加地址
export const addUserAddress = (data) => http.post("/shopping/addUserAddress",data)

//查询指定用户的所有地址（默认和非默认）
export const selectJsAddressAll = (data) => http.post("/shopping/selectJsAddressAll",data)

//将当前用户所有的地址都改成非默认
export const updateUserNoDefault = (data) => http.post("/shopping/updateUserNoDefault",data)

//修改用户的默认地址
export const updateUserIsDefault = (data) => http.post("/shopping/updateUserIsDefault",data)